package cn.edu.ahstu.hive;

import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.hadoop.hive.ql.exec.UDF;

public class DateToString extends UDF{
 public String evaluate(long number){
      long num=number;
      SimpleDateFormat dfs=new SimpleDateFormat("yyyy-MM-dd");
      return dfs.format(new Date(num));
 }
 public static void main(String[] args) {
      System.out.print(new DateToString().evaluate(2527639535750l));
 }
}

